home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mintmant / dlock.txt < prev    next >
Text File  |  1992-03-24  |  2KB  |  64 lines

  1. Dlock(2)                  Mar. 8, 1992                   Dlock(2)
  2.  
  3.  
  4.  
  5. NAME
  6.      Dlock - lock or unlock a BIOS disk device
  7.  
  8. SYNOPSIS
  9.      LONG Dlock( WORD mode, WORD drv );
  10.  
  11. DESCRIPTION
  12.      Dlock is used to lock or unlock the BIOS device indicated by
  13.      drv.   No  GEMDOS  file operations are permitted on a locked
  14.      drive. Thus, the Dlock call provides a  mechanism  for  disk
  15.      formatters  or  re-organizers  to  lock  out other processes
  16.      while low-level BIOS or XBIOS operations are in progress  on
  17.      the device.
  18.  
  19.      If mode is 1, the drive is locked; if it is 0 then the drive
  20.      is  unlocked  and may be used again by other programs.  If a
  21.      process terminates while holding a lock  on  a  drive,  that
  22.      drive is automatically unlocked.
  23.  
  24.      A lock operation followed immediately by an unlock  is  very
  25.      similar  to  a  media change, except that the lock operation
  26.      will fail if there are open files that refer  to  the  indi-
  27.      cated drive.
  28.  
  29. RETURNS
  30.      0 if the lock/unlock operation was successful
  31.  
  32.      EACCDN if mode is 1 and either open files exist on the drive
  33.      or  another  process has already locked the drive,or if mode
  34.      is 0 and the drive was locked by a different process
  35.  
  36.      EDRIVE if drv is not a valid BIOS device number
  37.  
  38. SEE ALSO
  39.      Fxattr(2)
  40.  
  41. NOTES
  42.      Note that Dlock operates on  BIOS  devices,  which  may  not
  43.      always  be  in 1-1 correspondence with GEMDOS drive letters.
  44.      For this reason, to lock GEMDOS drive A: (for example),  the
  45.      programmer  should  call  Fxattr on the root directory of A:
  46.      ("A:\") and then use the dev field of the structure returned
  47.      in  order  to determine the BIOS device corresponding to the
  48.      GEMDOS drive.
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60. Version 0.93  Last change: MiNT Programmer's Manual             1
  61.  
  62.  
  63.  
  64.